﻿using Terraria.GameContent.Creative;
using Terraria.ID;
using Terraria;
using Terraria.ModLoader;
using EAS.Common.Players;

namespace EAS.Content.Items
{
    public class MagicRune : ModItem
    {
        public override void SetStaticDefaults()
        {
            CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
        }
        public override void SetDefaults()
        {
            Item.width = 21;
            Item.height = 21;
            Item.rare = 2;
            Item.accessory = true;
            Item.value = Item.sellPrice(0, 1, 4, 10);
        }
        public override void AddRecipes()
        {
            Recipe modRecipe = Recipe.Create(Type, 1);
            modRecipe.AddIngredient(109, 5);
            modRecipe.AddTile(TileID.TinkerersWorkbench);
            modRecipe.Register();
        }
        public override void UpdateAccessory(Player player, bool hideVisual)
        {
            player.GetDamage(DamageClass.Magic) += 0.1f;
            player.statManaMax2 += 100;
            player.GetModPlayer<AccPlayer>().magicRuneEffect = true;
        }
    }
}
